---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ReferenceGrant
metadata:
  name: reference-grant-wrong-namespace
  namespace: gateway-conformance-infra
spec:
  from:
    - group: gateway.networking.k8s.io
      kind: HTTPRoute
      namespace: gateway-conformance-infra
  to:
    - group: ""
      kind: Service
      name: web-backend
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ReferenceGrant
metadata:
  name: reference-grant-wrong-from-group
  namespace: gateway-conformance-web-backend
spec:
  from:
    - group: not-the-group-youre-looking-for
      kind: HTTPRoute
      namespace: gateway-conformance-infra
  to:
    - group: ""
      kind: Service
      name: web-backend
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ReferenceGrant
metadata:
  name: reference-grant-wrong-from-kind
  namespace: gateway-conformance-web-backend
spec:
  from:
    - group: gateway.networking.k8s.io
      kind: Gateway
      namespace: gateway-conformance-infra
  to:
    - group: ""
      kind: Service
      name: web-backend
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ReferenceGrant
metadata:
  name: reference-grant-wrong-from-namespace
  namespace: gateway-conformance-web-backend
spec:
  from:
    - group: gateway.networking.k8s.io
      kind: HTTPRoute
      namespace: not-the-namespace-youre-looking-for
  to:
    - group: ""
      kind: Service
      name: web-backend
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ReferenceGrant
metadata:
  name: reference-grant-wrong-to-group
  namespace: gateway-conformance-web-backend
spec:
  from:
    - group: gateway.networking.k8s.io
      kind: HTTPRoute
      namespace: gateway-conformance-infra
  to:
    - group: not-the-group-youre-looking-for
      kind: Service
      name: web-backend
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ReferenceGrant
metadata:
  name: reference-grant-wrong-to-kind
  namespace: gateway-conformance-web-backend
spec:
  from:
    - group: gateway.networking.k8s.io
      kind: HTTPRoute
      namespace: gateway-conformance-infra
  to:
    - group: ""
      kind: Secret
      name: web-backend
---
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ReferenceGrant
metadata:
  name: reference-grant-wrong-to-name
  namespace: gateway-conformance-web-backend
spec:
  from:
    - group: gateway.networking.k8s.io
      kind: HTTPRoute
      namespace: gateway-conformance-infra
  to:
    - group: ""
      kind: Secret
      name: not-the-service-youre-looking-for
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
  name: reference-grant
  namespace: gateway-conformance-infra
spec:
  parentRefs:
    - name: same-namespace
  rules:
    - backendRefs:
        - name: web-backend
          namespace: gateway-conformance-web-backend
          port: 8080
